package com.tutorialspoint.jdbc;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

public class StudentMapper 
	implements RowMapper<Student> {
	public Student mapRow(ResultSet rs, int rowNum) throws SQLException {
		Student sdt = new Student();
		sdt.setId(rs.getInt("id"));
		sdt.setName(rs.getString("name"));
		sdt.setAge(rs.getInt("age"));
		return sdt;
	}
}
